<?php

class Site extends CI_Controller 
{
	function __construct()
	{
		//parent::Controller();
		parent::__construct();
		$this->is_logged_in();
	}

	function home()
	{
		$this->load->view('admin_views/home');
	}
	
	function another_page() // just for sample
	{
		echo 'good. you\'re logged in.';
	}
	
	function is_logged_in()
	{
		$is_logged_in = $this->session->userdata('is_logged_in');
		if(!isset($is_logged_in) || $is_logged_in != true)
		{
			//echo 'You don\'t have permission to access this page. <a href="/login">Login</a>';
			//die();
                         redirect('login');
			//$this->load->view('login_form');
		}		
	}	
	
	function member()
	{
		$this->load->view('user_views/member/new_member');
	}
	
	// function print_nota()
	// {
		// $this->load->view('member/print_nota');
	// }

}
